Form/dbcon
	form_window = "window=DBCON;titlebar=0;can_close=0;can_minimize=0;size=600x400"

	var
		username
		password
		password_interface = PASSWORD
		server = "localhost"
		port = 3306
		database = "dm_test"

	HtmlLayout()
		return {"
		<center>
		Username: [username]<br>
		Password: [password]<br>
		Server: [server] Port [port]<br>
		Database: [database]
		<br>
		<br>
		[submit]"}

	ProcessForm()
		var/client/c = usr.client
		if(!c.DBC) c.DBC = new()
		c.DBC.Connect("dbi:mysql:[database]:[server]:[port]","[username]","[password]")
		usr<<browse(null, "window=DBCON")
		if(c.DBC.IsConnected())
			alert("Connected Succesfully!","DB Connection")
		else
			alert("CONNECTION FAILED!\n[c.DBC.ErrorMsg()]","DB Connection")


Form/Chargen


